﻿<script>
function danhmuc(j){

	objName = "danhmuc[" + j + "]";
	var obj=document.getElementById(objName);
//alert(objName);
var objImg = obj.parentNode.getElementsByTagName("img")[0];
objImg.src="images/arrow-square.gif";

	if(obj.style.display == "none"){
		obj.style.display = "block";
		objImg.src="images/arrow-square.gif";


	}else{
		obj.style.display = "none";
		objImg.src="images/arrow-square2.gif";
	}
}
</script>
<table width="195" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="35" background="images/bgn_menu2.png">
    <div align="left" style="color:#FFFFFF; font-family:Tahoma; font-size: 14px; padding-left:30px; font-weight:bold">NỘI THẤT VIỆT ĐỨC</div></td>
  </tr>
  <tr>
  	<td height=30 background='images/bg_menu52.png' style="padding-left:5px">    
    <img src="/images/icon_menu1.gif" width="16" height="23" align="middle" />
    <a href=index.php style="color:#FFFFFF" onMouseOver="style.color='#00FF00'" onMouseOut="style.color='#FFFFFF'"><strong>Trang Chủ</strong></a>
  	</td>
  </tr>
	<?php
		include "connect.php";
		$sql="select * from nhomsanpham";
		$kq=mysql_query($sql);		
		while($r=mysql_fetch_array($kq))
		{
			$id_nhom=$r["id_nhom"];
			$tennhom=$r["tennhom"];
			if($id_nhom==1)
			{
				echo "<tr><td height=30 background='images/bg_menu52.png' style=\"padding-left:5px\">
				<img src=\"/images/icon_menu1.gif\" width=16 height=23 align=middle />
				<a href=?b=nsp&idn=$id_nhom style=\"color:#FFFFFF\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\"><strong>$tennhom</strong></a></td></tr>";
			
				$sql2="select * from loaisanpham where id_nhom=1";
				$kq2=mysql_query($sql2);
				$numrow2=mysql_num_rows($kq2);
				if($numrow2==0)
					echo "";
				else
				{	while($r2=mysql_fetch_array($kq2))
					{
						$tenloai=$r2["tenloaisp"];$id_loai=$r2["id_loai"];					
						echo "<tr><td height=30 background='images/bg_menu42.png'><div style=\"padding-left:25px\"><a href=?b=lsp&idl=$id_loai style=\"color:#FFFFFF\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\">$tenloai</a></div></td></tr>";
					}
				}
				echo "<tr><td height=30 background='images/bg_menu42.png'><div style=\"padding-left:25px\"><a href=?b=lsp&idl=$id_loai style=\"color:#FFFFFF\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\">Mã Màu Dây</a></div></td></tr>";
				echo "<tr><td height=30 background='images/bg_menu42.png'><div style=\"padding-left:25px\"><a href=?b=kd style=\"color:#FFFFFF\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\">Kiểu Đan</a></div></td></tr>";
			}
			else
			{
				echo "<tr><td height=30 background='images/bg_menu52.png' style='padding-left:5px'>
				<img src=\"/images/icon_menu1.gif\" width=16 height=23 align=middle />				
				<a href=?b=nsp&idn=$id_nhom style=\"color:#FFFFFF\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\"><strong>$tennhom</strong></a></td></tr>";
			
				$sql2="select * from loaisanpham where id_nhom=$id_nhom";
				$kq2=mysql_query($sql2);
				$numrow2=mysql_num_rows($kq2);
				if($numrow2==0)
					echo "";
				else
				{	while($r2=mysql_fetch_array($kq2))
					{
						$tenloai=$r2["tenloaisp"];$id_loai=$r2["id_loai"];					
						echo "<tr><td height=30 background='images/bg_menu42.png'><div style=\"padding-left:25px\"><a href=?b=lsp&idl=$id_loai style=\"color:#FFFFFF\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\">$tenloai</a></div></td></tr>";
					}
				}
			}
			
		}
		$sql3="select * from menu";
		$kq3=mysql_query($sql3);
		while($r3=mysql_fetch_array($kq3))
		{
			$tenmenu=$r3["tenmenu"];$id_menu=$r3["id_menu"];
			echo "<tr><td height=30 background='images/bg_menu52.png' style='padding-left:5px'>
				<img src=\"/images/icon_menu1.gif\" width=16 height=23 align=middle />
			<a href=\"index.php?b=m&idm=$id_menu\" style=\"color:#FFFFFF\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\">
			<strong>$tenmenu</strong></a></td></tr>";
		}
/*		$sql5="select * from loaisanpham where id_nhom=0";
		$kq5=mysql_query($sql5);
		while($r5=mysql_fetch_array($kq5))
		{
			$tenloaisp5=$r5["tenloaisp"];$id_loai5=$r5["id_loai"];
			echo "<tr><td height=30 background='images/bg_menu52.png' style='padding-left:5px'><a href=?b=lsp&idl=$id_loai5 style=\"color:#FFFFFF\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\"><strong>$tenloaisp5</strong></a></td></tr>";	
		}*/
	?>
</table>
<table width="195" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height=30 background='images/bg_menu52.png' style="color:#FFF; padding-left:5px">
    <img src="/images/icon_menu1.gif" width="16" height="23" align="middle" />
    <a href=index.php?b=bds style="color:#FFFFFF" onMouseOver="style.color='#00FF00'" onMouseOut="style.color='#FFFFFF'"><strong> Bất Động Sản</strong></a>
    </td>
    </tr>
  <tr>
    <td height=30 background='images/bg_menu62.png' style="color:#FFF; padding-left:5px">
    <img src="/images/icon_menu1.png" width="16" height="23" align="middle" />
    <strong> Hàng Đặt ( Chưa Có Giá )</strong>
  <?php
	$sql4="select * from nhomsanpham";
	$kq4=mysql_query($sql4);	
	$i=1;
	while($r4=mysql_fetch_array($kq4))
	{
		$tennhom4=$r4["tennhom"];$id_nhom4=$r4["id_nhom"];					
		echo "<tr><td background='images/bg_menu42.png'>
		<div style=\"padding-left:22px;\">
		<table border=0 cellspacing=0 cellpadding=0 >
		<tr><td height=30px width=189>
		<a style=\"color:#FFFFFF\" onclick='danhmuc($i);' onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#FFFFFF'\">$tennhom4</a>
		</td><td width=16 style='padding-right:2px'>
		<a onclick=\"danhmuc($i);\"><img src=\"images/arrow-square2.gif\" width=16 height=16 /></a>
		</td></tr></table>
		</div>";
		$sql5="select * from loaisanpham where id_nhom=$id_nhom4";
		$kq5=mysql_query($sql5);
		echo "<table width=195 id='danhmuc[$i]' style='display:none' border=0 cellspacing=0 cellpadding=0>";
		while($r5=mysql_fetch_array($kq5))
		{
			$tenloai=$r5["tenloaisp"];$id_loai=$r5["id_loai"];					
			echo "
			<tr><td height=30 width=195 background='images/bg_04.png'>
			<div style=\"padding-left:35px\">
			<a href=?b=lsp&idl=$id_loai&c=md style=\"color:#000000\" onMouseOver=\"style.color='#00FF00'\" onMouseOut=\"style.color='#000000'\">$tenloai</a>
			</div></td></tr>";
		}	
		echo "</table>";
		echo "</td></tr>";
		$i++;
	}
	
?>
  </td>
  </tr>
  <tr>
    <td height=30 background='images/bg_menu52.png' style="color:#FFF; padding-left:5px">
    <img src="/images/icon_menu1.gif" width="16" height="23" align="middle" />    
    <a href=# style="color:#FFFFFF" onMouseOver="style.color='#00FF00'" onMouseOut="style.color='#FFFFFF'"><strong> Khách Hàng Thân Thiết</strong></a>
    </td>
  </tr>
  <tr>
    <td height=30 background='images/bg_menu52.png' style="color:#FFF; padding-left:5px">
    <img src="/images/icon_menu1.gif" width="16" height="23" align="middle" />    
    <a href=# style="color:#FFFFFF" onMouseOver="style.color='#00FF00'" onMouseOut="style.color='#FFFFFF'"><strong> Video Clip Về Cty Việt Đức</strong></a>
    </td>
  </tr>
  <tr>
    <td height=30 background='images/bg_menu52.png' style="color:#FFF; padding-left:5px">
    <img src="/images/icon_menu1.gif" width="16" height="23" align="middle" />    
    <a href=# style="color:#FFFFFF" onMouseOver="style.color='#00FF00'" onMouseOut="style.color='#FFFFFF'"><strong> Công Trình Tiêu Biểu</strong></a>
    </td>
  </tr>
  <tr>
    <td height=30 background='images/bg_menu52.png' style="color:#FFF; padding-left:5px">
	<img src="/images/icon_menu1.gif" width="16" height="23" align="middle" />
    <a href=index.php?b=lienhe style="color:#FFFFFF" onMouseOver="style.color='#00FF00'" onMouseOut="style.color='#FFFFFF'"><strong> Liên Hệ</strong></a>
    </td>
  </tr>
</table>
